<import resource="classpath:alfresco/extension/templates/webscripts/vgr/common.js">

modelPrefix = "{vgr.model}";

model.publishableProperties = aspects.getAspectProperties(modelPrefix+ "publishable");

if (args.system != undefined) {
	model.system = args.system;
	aspectName = modelPrefix + args.system;
	systemProperties = aspects.getAspectProperties(aspectName);
	
	if (systemProperties == null) {
		status.code = 500;
		status.message = "Could not find the aspect for the specified system";
		status.redirect = true;
	} else {
		model.systemProperties = systemProperties;
	}
} else {
	model.system = "";
}